#include <iostream>
#include <list>
using namespace std;
#include <boost/foreach.hpp>
#include <boost/algorithm/string.hpp>
using namespace boost;

int main()
{
    cout << "--- Start ---" << endl;

    const string str1 = "Ellipse,[Spline],Draw";
    const string str2 = "[Area],[Circ],D1,D2";

    list<string> l;
    find_all(l, str1, "ESD");
    BOOST_FOREACH(string s, l) {
        cout << s << endl; 
    }
   
    cout << "~~~~~~~~~~~~" << endl;

    list<string> l2;
    split(l2, str2, is_any_of(","));
    BOOST_FOREACH(string s, l2) {
        cout << s << endl; 
    }
    cout << "--- End ---" << endl;
    return 0;
}
